package cn.darkhorse.device.service;

import cn.darkhorse.device.pojo.MesSpareInboundInfo;
import cn.darkhorse.device.vo.MesSpareInboundInfoVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 备件入库表 服务类
 * </p>
 *
 * @author maoguanjun
 * @since 2022-11-11
 */
public interface MesSpareInboundInfoService extends IService<MesSpareInboundInfo> {

    /**
     * 列表
     * @param spareName
     * @param typeName
     * @param beginTime
     * @param endTime
     * @return
     */
    List<MesSpareInboundInfoVO> listAll(String spareName, String typeName, String beginTime, String endTime,String orderType);

    /**
     * 保存
     * @param mesSpareInboundInfo
     * @return
     */
    boolean saveSpareInbound(MesSpareInboundInfo mesSpareInboundInfo);

    /**
     * 删除
     * @param id
     * @return
     */
    boolean delete(Long id);

    /**
     * 提交
     * @param id
     * @return
     */
    boolean submit(Long id);

    /**
     * 审核
     *
     * @param id
     * @param approver
     * @param approveTime
     * @return
     */
    boolean audit(Long id, Long approver, String approveTime,Integer auditStatus);

    /**
     * 弃审
     * @param id
     * @return
     */
    boolean waiver(Long id);

    /**
     * 查看
     * @param id
     * @return
     */
    MesSpareInboundInfoVO view(Long id);

    /**
     * 是否存在入库记录
     * @param spareId
     * @return
     */
    boolean recordExists(Long spareId);
}
